package com.hgkj.cloud.base.service.impl;

import com.hgkj.cloud.base.common.PageInfo;
import com.hgkj.cloud.base.dao.HcChannelsMapper;
import com.hgkj.cloud.base.domain.HcChannels;
import com.hgkj.cloud.base.service.HcChannelsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class HcChannelsServiceImpl implements HcChannelsService {

    @Autowired
    private HcChannelsMapper hcChannelsMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return hcChannelsMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(HcChannels record) {
        return hcChannelsMapper.insert(record);
    }

    @Override
    public int insertSelective(HcChannels record) {
        return hcChannelsMapper.insertSelective(record);
    }

    @Override
    public HcChannels selectByPrimaryKey(Integer id) {
        return hcChannelsMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(HcChannels record) {
        return hcChannelsMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(HcChannels record) {
        return hcChannelsMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<HcChannels> listAllData(PageInfo pi, Map<String, Object> map) {
        if(pi != null){
            map.put("currentCount", pi.getCurrentCount());
            map.put("pageSize", pi.getPageSize());
        }
        return hcChannelsMapper.listAllData(map);
    }

    @Override
    public int listAllDataCount(Map<String, Object> map) {
        return hcChannelsMapper.listAllDataCount(map);
    }

    @Override
    public HcChannels selectDataByMap(Map<String, Object> map) {
        return hcChannelsMapper.selectDataByMap(map);
    }
}

